package cn.jiyun.service.fegin;

import cn.jiyun.entity.ResultClass;
import cn.jiyun.entity.day6.Tabs;
import cn.jiyun.entity.day9.DirectoryResult;
import cn.jiyun.entity.day9.UCDMiddle;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("day9-directory")
public interface DirectoryFeginService {
/*
 * @description:
 * @author: sjt
 * @date: 2023/8/31 11:09
 * @param: [cid]
 * @return: java.util.List<cn.jiyun.entity.day9.DirectoryResult>
 * @annotate:根据课程id/返回课程的目录集合
**/
    @GetMapping("/directory/findDitectoryList")
    List<DirectoryResult> findDitectoryList(@RequestParam("cid")Integer cid);
/*
 * @description:
 * @author: sjt
 * @date: 2023/8/31 11:10
 * @param: [cid]
 * @return: java.lang.Integer
 * @annotate:根据课程id查询二级目录的个数
**/
    @GetMapping("/directory/findTowDitectoryNum")
    Integer findTowDitectoryNum(@RequestParam("cid") Integer cid);
/*
 * @description:
 * @author: sjt
 * @date: 2023/8/31 11:10
 * @param: [cid, uid]
 * @return: java.util.List<cn.jiyun.entity.day9.UCDMiddle>
 * @annotate:根据课程id,用户id/返回此用户已经学习过的课程
**/
    @GetMapping("/directory/findUserOverDirectory")
    List<UCDMiddle> findUserOverDirectory(@RequestParam("cid") Integer cid, @RequestParam("uid")Integer uid);
/*
 * @description:
 * @author: sjt
 * @date: 2023/8/31 11:11
 * @param: [cid, uid, did]
 * @return: cn.jiyun.entity.ResultClass
 * @annotate:用户学习一个目录内容
**/
    @GetMapping("/directory/xueDirectory")
    ResultClass xueDirectory(@RequestParam("cid") Integer cid,@RequestParam("uid") Integer uid,@RequestParam("did") Integer did);
//根据id查询当前用户学习此课程的进度
    @GetMapping("/directory/findUserCourseSchedule")
    Integer findUserCourseSchedule(@RequestParam("cid") Integer cid,@RequestParam("uid") Integer uid);
}
